package org.onvivals.common.web;


import io.swagger.v3.oas.annotations.media.Schema;

import java.io.Serializable;
import java.util.List;

/**
 * 分页查询返回结果
 *
 * @author weirdor (179946422@qq.com)
 * @version v1.0.0
 */
public class PageResult<T> implements Serializable {
	private static final long serialVersionUID = 1L;

	@Schema(description =  "当前页数据")
	private List<T> list;

	@Schema(description =  "总数量")
	private Long count;

	public PageResult() {
	}

	public PageResult(List<T> list) {
		this(list, null);
	}

	public PageResult(List<T> list, Long count) {
		setList(list);
		setCount(count);
	}

	public List<T> getList() {
		return this.list;
	}

	public void setList(List<T> list) {
		this.list = list;
	}

	public Long getCount() {
		return this.count;
	}

	public void setCount(Long count) {
		this.count = count;
	}

}
